package org.example.demoarticle.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultByArticle {
    public int code;
    public String msg;
    public Object data;
    public static ResultByArticle succeed(PageBean pageBean) {
        return new ResultByArticle(1,"请求成功",pageBean);
    }
    public static ResultByArticle succeed(Object data) {
        return new ResultByArticle(1,"请求成功",data);
    }
    public static ResultByArticle error (String msg) {
        return new ResultByArticle(0,msg,null);
    }
}
